const Controller = require('egg').Controller

class TerminfoController extends Controller {
  async updateTerminfo() {
    const { ctx } = this
    const res = await ctx.service.crawler.courseTerminfo.index(ctx.request.body.categoryId)
    if (res.num >= 0) {
      return ctx.renderBack(res, '1', '正在爬取课程期数信息')
    }
  }
}

module.exports = TerminfoController
